package entity;

import java.io.Serializable;

import util.Iconstants;

/**
 * Created by Administrator on 2017/11/10.
 */
public class PageEntity implements Serializable{
    private Integer pageSize= Iconstants.ROWS;//每页显示的行数
    private Integer pageIndex=1;//当前页，默认为第一页
    private Integer pageCounts;//最大页(总页数)
    private Integer recordCounts;//总记录数
    /**
     * @return the pageSize
     */
    public Integer getPageSize() {
        return pageSize;
    }
    /**
     * @param pageSize the pageSize to set
     */
    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
    /**
     * @return the pageIndex
     */
    public Integer getPageIndex() {
        return pageIndex;
    }
    /**
     * @param pageIndex the pageIndex to set
     */
    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }
    /**
     * @return the recordCounts
     */
    public Integer getrecordCounts() {
        return recordCounts;
    }
    /**
     * @param recordCounts the recordCounts to set
     */
    public void setrecordCounts(Integer recordCounts) {
        this.recordCounts = recordCounts;
    }
    /**
     * @return the pageCounts
     */
    public Integer getPageCounts() {
        pageCounts=(recordCounts-1)/pageSize+1;
        return pageCounts;
    }

}
